<?php

namespace app\index\validate;

use think\Validate;

class User extends Validate
{
    protected $rule =   [
        'name'  => 'require',
        'login'  => 'require|unique:user',
        'password'   => 'require',
        'phone'   => 'require|unique:user',
        'address'   => 'require',
        'yue'   => 'require',
    ];

    protected $message  =   [
        'name' => '必须填写姓名',
        'login' => '必须填写登录名',
        'password'     => '必须填写密码',
        'phone'     => '必须填写电话',
        'address'     => '必须填写地址',
        'yue'     => '必须填写余额',
        'phone.unique' => '该号码已被绑定,请重新输入!',
        'login.unique' => '该账号已被注册',
    ];
}
